home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
011
/
alias.lbr
/
alias.asm
Wrap
Assembly Source File
|
1985-06-03
|
2KB
|
81 lines
; ALIAS.ASM by Susan Glinert-Cole 15 Sep 84
;
; Original source code copied from "CREATIVE COMPUTING", Jan 85, Vol 11 # 1
; Source code modified to include signon reflecting its origin and
; to give the command syntax.
;
; This program renames any subdirectory within the current directory
; only. Command syntax:
; ALIAS (old name) (new name)
;
;
; [][][][][]
; [ MACROS ]
; [][][][][]
;
PRINT MACRO TEXT ; This macro takes a string offset
LEA DX,TEXT ; as an argument and prints the
MOV AH,09 ; string.
INT 21H
ENDM ; PRINT MACRO
;
CODESEG SEGMENT PARA PUBLIC 'code'
;
ORG 100H
MAIN PROC FAR
ASSUME CS:CODESEG,DS:CODESEG
ASSUME ES:CODESEG,SS:CODESEG
JMP BEGIN
;
; [][][][][]
; [ DATA ]
; [][][][][]
;
CR EQU 0DH
LF EQU 0AH
FCB EQU 5CH
EFCB EQU FCB-7
ATTRIBUTE EQU FCB-1
SIGNON_MSG DB 'ALIAS.COM 15 Sept 84 by Susan Glinert-Cole',CR,LF
DB ' Copyright (c) 1984 by Ahl Computing, Inc.',CR,LF
DB 'Renames only the next level of subdirectories . .'
DB CR,LF,' Use: ALIAS (old name) (new name)'
DB CR,LF,LF,'$'
OK_MSG DB 'Renamed the Subdirectory',CR,LF,'$'
ERR_MSG DB 'Failed to find the Subdirectory',CR,LF,'$'
;
; [][][][][][][][]
; [ MAIN PROGRAM ]
; [][][][][][][][]
;
BEGIN: PUSH DX ; Standard program introduction
MOV AX,0
PUSH AX
PRINT SIGNON_MSG
MOV BX,EFCB ; Address of EFCB in PSP
MOV BYTE PTR[BX],0FFH
MOV BX,ATTRIBUTE ; Address of attribute byte
MOV BYTE PTR[BX],10H
;
; Rename the subdirectory
;
MOV DX,EFCB ; Point to EFCB
MOV AH,17H
INT 21H
;
; Print message
;
CMP AL,0FFH
JE ERROR
PRINT OK_MSG
JMP EXIT
;
ERROR: PRINT ERR_MSG
;=========================================================================
;
EXIT: RET
MAIN ENDP
CODESEG ENDS
END MAIN